<%@ page import="com.engine.kq.biz.KQWorkTime" %>
<%@ page import="java.util.Map" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="com.engine.kq.entity.WorkTimeEntity" %>
<%@ page import="com.engine.kq.entity.TimeScopeEntity" %>
<%@ page import="java.util.List" %><%

    String userId = request.getParameter("userId");
    String kqDate = request.getParameter("kqDate");

    KQWorkTime kqWorkTime = new KQWorkTime();
    Map<String, Object> serialInfo = kqWorkTime.getSerialInfo(userId, kqDate, false);
    out.println("serialInfo:" + JSONObject.toJSONString(serialInfo) + "<br>");
    if (serialInfo != null && serialInfo.size() > 0) {
        int serialid = Util.getIntValue(Util.null2String(serialInfo.get(kqDate)), 0);
        out.println("serialid:" + serialid + "<br>");
        if (serialid > 0) {
            out.println("0000" + "<br>");
        } else {
            out.println("1111" + "<br>");
        }
    }
    WorkTimeEntity workTime = kqWorkTime.getWorkTime(userId, kqDate);
    out.println("workTime is:" + JSONObject.toJSONString(workTime) + "<br>");
    List<TimeScopeEntity> workTime1 = workTime.getWorkTime();
    String startTime = null;
    String endTime = null;
    for (int i = 0; i < workTime1.size(); i++) {
        TimeScopeEntity timeScopeEntity = workTime1.get(i);
        if (i == 0) {
            startTime = timeScopeEntity.getBeginTime();
        }
        if (i == (workTime1.size() - 1)) {
            endTime = timeScopeEntity.getEndTime();
        }
    }
    out.println("workTime startTime and endTime is:" + startTime + "、" + endTime + "<br>");
    String bc = workTime.getSerialId();
    out.println("workTime bc:" + userId + "、" + bc);
%>